#ifndef AKTAZO_H
#define AKTAZO_H

#include <fstream>
#include <vector>

///aktazo.h is class definition for handle states of program
///based on UML State Machine diagram

#include "document.h"

class Aktazo
{
	private:
		std::ifstream f_in;
		std::ofstream f_out;
		const std::string filename;
		///the same data file is handled differentely when reading and when writing

		std::vector<Document> *v_ptr;
		///to store all records in a vector

		unsigned int v_old_size;
		///to strore the number of the records read from input file

		unsigned int v_new_size;
		///to strore the number of all the records (read from input file and
		///from user input

		void load_data();
		///initial activities: loading data from input file to vector

		void run();
		///main activities: handling menu choices

		void save_data();
		///finishing activities: saving only the new records

	public:
		enum Exceptions
		{
			FILE_READ_ERROR,
			FILE_WRITE_ERROR
		};

		Aktazo();

		~Aktazo();

};

#endif
